import requests

http_resp = requests.get("http://www.baidu.com")

# 响应头数据
print(http_resp.headers)

# 状态码
print(http_resp.status_code)

# 字节流转字符
print(http_resp._content.decode('utf-8'))
